Tutorial Brief

Using textblob library to perform basic sentement analysis.

Text Blob Library Links:

Import The Library


In [1]:
from textblob import TextBlob

Making a TextBlob Object


In [2]:
sent = TextBlob("This tutorial is the best thing in the history of mankind")
sent


Out[2]:
TextBlob("This tutorial is the best thing in the history of mankind")

Measuring sentiments


In [3]:
sent.sentiment


Out[3]:
Sentiment(polarity=1.0, subjectivity=0.3)

In [4]:
sent.polarity


Out[4]:
1.0

In [5]:
sent.subjectivity


Out[5]:
0.3